package cc.xiaolv123.vvvdjToBaidu.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serializable;

@Data
public class BaiduwangpanQuotaVO implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 参数名称	类型	描述
     * total	int	总空间大小，单位B
     * expire	bool	7天内是否有容量到期
     * used	int	已使用大小，单位B
     * free	int	免费容量，单位B
     */
    @JsonProperty("errmsg")
    private String errmsg;

    @JsonProperty("errno")
    private Integer errno;

    @JsonProperty("expire")
    private Boolean expire;

    @JsonProperty("free")
    private Long free;

    @JsonProperty("is_show_window")
    private Integer isShowWindow;

    @JsonProperty("newno")
    private String newno;

    @JsonProperty("recmd_vip")
    private String recmdVip;

    @JsonProperty("recyclestatus")
    private Integer recyclestatus;

    @JsonProperty("request_id")
    private String requestId;

    @JsonProperty("sbox_total")
    private Integer sboxTotal;

    @JsonProperty("sbox_used")
    private Integer sboxUsed;

    @JsonProperty("server_time")
    private Long serverTime;

    @JsonProperty("total")
    private Long total;

    @JsonProperty("used")
    private Long used;

    private String totalStr;

    private String usedStr;

    public String getTotalStr() {
        return (int) (total / 1024 / 1024 / 1024) + "G";
    }

    public String getUsedStr() {
        return (int) (used / 1024 / 1024 / 1024) + "G";
    }
}
